package org.patterns.creational.factorymethod;


public class Client {
    public static void main(String[] args) {
        //LoggerFactory factory = new FileLoggerFactory(); //可引入配置文件实现
        LoggerFactory factory = (LoggerFactory) XMLUtil.getBean(); //getBean()的返回类型为Object，需要进行强制类型转换

        Logger logger = factory.createLogger();
        logger.writeLog();
    }
}